  var easymana_tableId = "t_table"; //表格ID
  var easymana_formName = "";
  var cur_row = -1;
  var cur_row_tr = null;

  function setTableId(tid){
  	easymana_tableId = tid;
  }
  function setFormName(fn){
  	easymana_formName = fn;
  }
  //------------后台操作方法------------------//
  //---------------------------------------//
  //改变指定行的背景色
  function changeBack(row){
	cur_row = row.rowIndex;
	if(cur_row_tr != null){
		cur_row_tr.style.backgroundColor="#F9F8E8";
	}
	row.style.backgroundColor="#EEE999";
	cur_row_tr = row
 }
 
 //新增一行
 function addRecord(){
 	var dt = document.getElementById(easymana_tableId);
 	var dtbody = dt.children[0];
 	var newrow = dt.rows(1).cloneNode(true);
 	for (var i=0;i<newrow.children.length;i++) {
 		if(i == 0){
 			newrow.children[i].innerText = "";
 		}else{
			newrow.children[i].innerText = "default";
		}
	}
	dtbody.appendChild(newrow);
 	newrow.style.backgroundColor="#DCDCDC";
 }



function mOvr(roww) {
	roww.style.cursor = "hand";
	if(roww != cur_row_tr){
		roww.style.backgroundColor = "#FFF8C5";
	}
}
function mOut(roww) {
	roww.style.cursor = "default";
	roww.style.backgroundColor = "#F9F8E8";
	if(cur_row_tr != null){
		cur_row_tr.style.backgroundColor = "#EEE999";
	}
}
